1. Field of the Invention
The present invention relates to relational database optimization methods, and particularly to an optimized inequality join method that efficiently joins relational tables on inequality conditions.
2. Description of the Related Art
Relational databases are organized into tables that consist of rows and columns of data. The rows are formally called tuples. A database will typically have many tables, and each table will typically have multiple tuples and multiple columns. The tables are typically stored on random access storage devices (DASDs), such as magnetic or optical disk drives. Data may be retrieved from this type of database by a variety of methods. For example, a computer program can extract information from the database without human intervention, or a user can interact with a query system program, which serves as a front end to the database system. “Accessing a table” is used in the art to mean reading information from a table. Since the tables are normally stored on DASD, accessing a table requires transferring all or part of the table from DASD into the RAM of the computer system. When information is needed from a plurality of tables, the tables may be joined by the database software or firmware. Joins allow additional information to be obtained across tables in a meaningful way. A simple example would be that a table of employee information lists an employee's department number as ‘76’, but the definition of department ‘76’ requires reference to another table, the Department-table, which lists the full-department title associated with each department number. In this second table the row for department ‘76’ also contains a column with the department title “Information Systems Department.” Thus, a user desiring to generate a report containing a list of all employees, including their department titles, may want to establish a join relationship between the department number column in the Employee-table and the department title column in the Department-table, so that the employee's department can be printed in the title form instead of the numerical form. Ways of specifying and performing joins are the subject of substantial effort. Database tables can be very large, and processing tables can be expensive in terms of computer resources. Therefore, it is important that methods for joining tables be efficient.
Thus, an optimized inequality join method solving the aforementioned problems is desired.